<%= render :partial =>'/store/toolbar'%>
<div id="content_container">
<p>类别列表</p>

<table class="admin" style="margin-top: 15px;">
  <tr>
   <thead>
    <th>名称</th>
    <th></th>
    <th></th>
   </thead>
  </tr>

  <% for category in @categories %>
    <tr>
      <td><%=h category.name %></td>
      <td><%= link_to '编辑', edit_category_path(category) %></td>
      <td><%= link_to '删除', category, :confirm => '确定删除?', :method => :delete %></td>
    </tr>
  <% end %>
</table>
<%= will_paginate @categories,:prev_label => '«上一页',:next_label => '下一页»' %>

<%= link_to 'New category', new_category_path %>
</div>